package cn.gs.controller.lambdaTest;

public class Man extends Human {
    @Override
    public void sayHello() {
        System.out.println("Man hello!");
    }

    public void method(Greetable gre){
        gre.greet();
    }

    public void show(){
        method( () -> { new Human().sayHello(); } );
        method( () -> new Human().sayHello() );

        method( () -> super.sayHello() );
        method(super :: sayHello);

        method( () -> this.sayHello() );
        method(this :: sayHello);
    }
}
